+ public static void UpdateInput(bool highPriorityOnly)
+ {
+ Poll();
+ DispatchPauseEvent();
+ if (!highPriorityOnly)
+ {
+ UpdateInput();
+ }
+ }
+
+ public static void DispatchPauseEvent()
+ {
+ // OK THIS IS ALL KINDS OF WRONG. THIS IS A PLACEHOLDER BECAUSE DEMO!
+ var keyPressed = false;
+ if ((InputKeyboardState.IsKeyDown(Keys.Enter) || InputGamePadState.IsButtonDown(Buttons.Start))) {
+ keyPressed = true;
+ if(!BlockedButtons.Contains("pause") && !BlockedKeys.Contains("pause"))
+ {
+ BlockedButtons.Add("pause");
+ BlockedKeys.Add("pause");
+ Console.WriteLine("Dispatch");
+ Dispatch("pause", 0);
+ }
+ }
+
+ if (!keyPressed)
+ {
+ BlockedButtons.Remove("pause");
+ BlockedKeys.Remove("pause");
+ }
+ }
+